package top.wshape1.rpc.message;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2024-02-07
 */

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@Data
public class PingPongMessage extends RpcMessage {

    private String msg;

    public static PingPongMessage Ping() {
        return new PingPongMessage("PING");
    }

    public static PingPongMessage Pong() {
        return new PingPongMessage("PONG");
    }

    @Override
    public int getMessageType() {
        return MessageType.PING_PONG.ordinal();
    }

    private static final long serialVersionUID = 1L;
}
